package com.heima.proxy;

import com.heima.real.SuperStar;
import com.heima.service.Sing;

//代理对象
public class ProxyStar implements Sing {
    private SuperStar superStar;

    public ProxyStar(SuperStar superStar) {
        this.superStar = superStar;
    }

    @Override
    public void sing() {
        System.out.println("谈合同");
        superStar.sing();
        System.out.println("完事收费");
    }

    @Override
    public void ctrl() {
        System.out.println("你会啥绝活");
        superStar.ctrl();
        System.out.println("真‘绝‘活！");
    }
}
